#ifndef _AUDIO_ALGORITHM_H
#define _AUDIO_ALGORITHM_H

#include <stdint.h>

void audio_algorithm_init(void);
void audio_algorithm_release(void *);
void audio_algorithm_recv_data(int16_t *mic, int16_t *esco_in, uint8_t esco_data_mute, int16_t *mcu_mic_buffer, int16_t *mcu_esco_in_buffer);
// void audio_algorithm_send_data(int16_t *spk, int16_t *spk_i2s, int16_t *esco_out);

/* 头文件 / 声明处一并改动 */
void audio_algorithm_send_data(int16_t *spk,
    int16_t *spk_i2s,
    int16_t *esco_out,
    int16_t *spk_dup,
    int16_t *mcu_esco_buffer);   // <–– 新增

// 鏂板锛氭帶鍒舵壃澹板櫒鏁版嵁鍙戦�鐨勫嚱鏁�
void audio_algorithm_enable_speaker_data(uint8_t enable);
uint8_t audio_algorithm_get_speaker_data_status(void);

// 鏂板锛氬彂閫佹壃澹板櫒鏁版嵁鐨勪换鍔″鐞嗗嚱鏁�
void audio_algorithm_send_speaker_data_task(struct task_msg_t *msg);
void audio_algorithm_send_data_callback();

// 新增：处理MCU发送的ADPCM音频数据
void audio_algorithm_recv_mcu_adpcm_data(uint8_t *adpcm_data, uint32_t length);
#endif  //_AUDIO_ALGORITHM_H
